<extend name = "Common/baseView"/>
 <block name="css">
 	<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
 	<style type="text/css">
 		.containe{ width:900px;margin:100px auto;}
 		.table{text-align:left;margin-top: 20px;}
 		select{width: 100px;height: 30px;}
 		.btn{background: #009688;color: #fff;display: block;float: right;margin-right: 10px;}
		a:hover{
				 text-decoration: none;
			 }
 	</style>
 </block>
<block name="body">
	  <div class="containe">
	  <form action="edit?a={$orders.id}" method="post">
	  <table class="table table-bordered">
	  	<tr>
	  		<td width="100px">用户ID</td>
	  		<td colspan="2">{$users.id}</td>
	  		
	  	</tr>
	  	<tr>
	  		<td>用户名</td>
	  		<td colspan="2">{$users.name}</td>
	  	</tr>
	  	<tr>
	  		<td>订单ID</td>
	  		<td colspan="2">{$orders.id}</td>
	  	
	  	</tr>
	  	<tr>
	  		<td>订单号</td>
	  		<td colspan="2">{$orders.order_no}</td>
	  	</tr>
	  	<tr >
	  		<td rowspan="3">商品总数量</td>
	  		<td colspan="2">{$orders.order_sum}</td>
	  		
	  	</tr>

	  	<tr>
	  		<td width="100px" rowspan="2">商品名称</td>
	  		<td rowspan="2">
	  			<foreach name="goods" item="value" key="key">
	  	     	{$value.goods_name}<?php echo '('.$value['goods_num'].')';echo '&nbsp;,&nbsp;';?>
	  		</foreach>
	  	     </td>
	  	</tr>
	  	<tr></tr>
	  	<tr>
	  		<td>商品总价格</td>
	  		<td colspan="2">{$orders.order_price}</td>
	  		
	  	</tr>
	  	<tr>
	  		<td>配送方式</td>
	  		<td colspan="2">{$orders.send_type}</td>
	  	</tr>
	  	<tr>
	  		<td>订单状态</td>
	  		 <?php 
     			   if($orders['status']==0)
     			        $sta1='未支付';
     			   elseif($orders['status']==1)
     			         $sta1='已支付'; 
     			       else  $sta1='退货';
  
                ?>
     			<td colspan="2">
     			<select name="order_sta">
    			   <option>{$sta1}</option>
    			   <option>未支付</option>
    			   <option>已支付</option>
    			   <option>退货</option>
    		</select>
     			
     		</td>
	  	</tr>
	  	<tr>
	  		<td>物流状态</td>
	  		 <?php 
                  if($goods[0]['status']==0)
     			      $sta2='未派送';
     			  elseif($goods[0]['status']==1)  
     			      $sta2='派送中'; 
     			 else $sta2='已送达';
     			 ?>
     			<td colspan="2">
	     			<select name="sta">
	    			<option>{$sta2}</option>
	    			<option>未派送</option>
	    			<option>派送中</option>
	    			<option>已送达</option>
	    		    </select>
    		   </td>
	  	</tr>
	  	<tr>
	  		<td>物流单号</td>
	  		<td colspan="2"><input type="text" name="logistics" value=" {$orders.logistics_no}"></td>
	  	</tr>
	  	<tr>
	  		<td>创建时间</td>
	  		<td colspan="2">{$orders.create_time|date="Y-m-d H:m:s",###}</td>
	  	</tr>

	  </table>
	  
	  <input type="submit" value="保存" class="btn" id="sure" />
	  <input type="button" value="取消" class="btn" id="quxiao"/>
	  </form>
</div>

</block>
<block name="js">
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript">
	 $('#sure').click(function(){
		  var msg = "您真的确定要修改吗？\n\n请确认！"; 
      if (confirm(msg)==true){ 
           return true; 
      }else{ 
         return false; 
         } 

	 });
	 $('#quxiao').click(function(){
		 location.href="{:U('Order/userOrders')}";
	 });
	 $('#orderlist').addClass("layui-this");
	 $('#user').addClass("layui-nav-itemed");
         
</script>
</block>